<!-- text按钮 -->
<template>
  <div class="btn-plain-main" :class="type" @click="onClick">
    <slot></slot>
  </div>
</template>

<script type="text/javascript">
export default {
  name: "btn-plain",
  props: {
    type: {
      type: String,
      default: "text",
    },
  },
  methods: {
    onClick () {
      this.$emit('click')
    }
  }
};
</script>

<style lang="less" scoped>
.btn-plain-main {
  display: inline-block;
  height: 32px;
  padding: 0 15px;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  vertical-align: middle;
  border-radius: 4px;

  .ivu-icon {
    margin-right: 4px;
  }
}
.text {
  color: #999;
  background-color: #f0f0f0;
  border: 1px solid #f0f0f0;
}
.primary {
  color: #2d8cf0;
  background-color: #e5f1ff;
  border: 1px solid #e5f1ff;
}
.warning {
  color: #f90;
  background-color: #fdf0df;
  border: 1px solid #fdf0df;
}
.error {
  color: #ed4014;
  background-color: #fdebec;
  border: 1px solid #fdebec;
}
.success {
  color: #19be6b;
  background-color: #e9f9eb;
  border: 1px solid #e9f9eb;
}
.green {
  color: #1ccad5;
  background-color: #e2f9fa;
  border: 1px solid #e2f9fa;
}
</style>
